﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace GD.ModelContest.Logs
{
    public static class Log4Net
    {
        public static void Log4NetInit()
        {
            log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(System.Web.HttpContext.Current.Server.MapPath(ConfigurationManager.AppSettings["Log4NetConfigFile"])));
        }

        /// <summary>
        /// 系统日志
        /// </summary>
        /// <returns></returns>
        public static log4net.ILog ErrorLog()
        {
            return log4net.LogManager.GetLogger("GdErrorLog");
        }

        public static log4net.ILog InfoLog()
        {
            return log4net.LogManager.GetLogger("GdInfoLog");
        }
    }
}
